package com.jy.adscm.zltx.bean;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.jy.adscm.core.interceptor.DateJsonDeserializer;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 图纸清单表
 * </p>
 *
 * @author zyl
 * @since 2018-10-26
 */
public class JyDrawingList implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private String drawingName;
    private String drawingCode;
    private String drawingVersion;
    private Integer changeTimes;
    private Integer drawingCreater;
    @TableField(exist = false)
    private String drawingCreater_name;
    private Integer drawingPublisher;//图纸发布人
    @TableField(exist = false)
    private String  drawingPublisher_name;
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date drawingPublishTime;//发布时间
    private String drawingIsPublish;//图纸是否发布
    @TableField("drawing_need_train")
    private String drawingNeedTrain;//图纸是否需要培训
    private String approvalRemark;//审核批注，已经废弃
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date lastEditTime;
    private Long parentId;
    private Integer drawingType;
    @TableField(exist = false)
    private String drawingTypeName;
    @TableField(exist = false)
    private String drawingType_desc;//图纸类型中文描述
    private String drawingPath;//图纸路径
    private String drawingRemark;
    private String technicsRemark;//工艺说明
    @TableField("relevant_dept")
    private String relevantDept;//相关部门
    private String drawingPrice;
    private String addFlag;//是否已经添加，初次添加后，状态改变为1，界面上就不能编辑了
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private  Date   updateTime;
    @TableField(exist = false)
    private List<JyDrawingList> children;

    @TableField(exist = false)
    private List<JyDrawingAnnex> annexes;//附件
    @TableField(exist = false)
    private  String hasSame;
    @TableField(exist = false)
    private  String isUpdate;

    private Integer  rank;

    public Integer getRank() {
        return rank;
    }

    public void setRank(Integer rank) {
        this.rank = rank;
    }

    public String getIsUpdate() {
        return isUpdate;
    }

    public void setIsUpdate(String isUpdate) {
        this.isUpdate = isUpdate;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getDrawingTypeName() {
        return drawingTypeName;
    }

    public void setDrawingTypeName(String drawingTypeName) {
        this.drawingTypeName = drawingTypeName;
    }

    public String getDrawingNeedTrain() {
        return drawingNeedTrain;
    }

    public void setDrawingNeedTrain(String drawingNeedTrain) {
        if(drawingNeedTrain != null && !"".equals(drawingNeedTrain)){
            this.drawingNeedTrain = drawingNeedTrain;
        }else {
            this.drawingNeedTrain = "0";
        }
    }

    public String getHasSame() {
        return hasSame;
    }

    public void setHasSame(String hasSame) {
        this.hasSame = hasSame;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDrawingName() {
        return drawingName;
    }

    public void setDrawingName(String drawingName) {
        this.drawingName = drawingName;
    }

    public String getDrawingCode() {
        return drawingCode;
    }

    public void setDrawingCode(String drawingCode) {
        this.drawingCode = drawingCode;
    }

    public String getDrawingVersion() {
        return drawingVersion;
    }

    public void setDrawingVersion(String drawingVersion) {
        this.drawingVersion = drawingVersion;
    }

    public Integer getChangeTimes() {
        return changeTimes;
    }

    public void setChangeTimes(Integer changeTimes) {
        this.changeTimes = changeTimes;
    }

    public Integer getDrawingCreater() {
        return drawingCreater;
    }

    public void setDrawingCreater(Integer drawingCreater) {
        this.drawingCreater = drawingCreater;
    }

    public String getDrawingCreater_name() {
        return drawingCreater_name;
    }

    public void setDrawingCreater_name(String drawingCreater_name) {
        this.drawingCreater_name = drawingCreater_name;
    }

    public Integer getDrawingPublisher() {
        return drawingPublisher;
    }

    public void setDrawingPublisher(Integer drawingPublisher) {
        this.drawingPublisher = drawingPublisher;
    }

    public String getDrawingPublisher_name() {
        return drawingPublisher_name;
    }

    public void setDrawingPublisher_name(String drawingPublisher_name) {
        this.drawingPublisher_name = drawingPublisher_name;
    }

    public Date getDrawingPublishTime() {
        return drawingPublishTime;
    }

    @JsonDeserialize(using = DateJsonDeserializer.class)
    public void setDrawingPublishTime(Date drawingPublishTime) {
        this.drawingPublishTime = drawingPublishTime;
    }

    public String getDrawingIsPublish() {
        return drawingIsPublish;
    }

    public void setDrawingIsPublish(String drawingIsPublish) {
        this.drawingIsPublish = drawingIsPublish;
    }

    public String getApprovalRemark() {
        return approvalRemark;
    }

    public void setApprovalRemark(String approvalRemark) {
        this.approvalRemark = approvalRemark;
    }

    public Date getCreateTime() {
        return createTime;
    }
    @JsonDeserialize(using = DateJsonDeserializer.class)
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getLastEditTime() {
        return lastEditTime;
    }
    @JsonDeserialize(using = DateJsonDeserializer.class)
    public void setLastEditTime(Date lastEditTime) {
        this.lastEditTime = lastEditTime;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Integer getDrawingType() {
        return drawingType;
    }

    public void setDrawingType(Integer drawingType) {
        this.drawingType = drawingType;
    }

    public String getDrawingType_desc() {
        return drawingType_desc;
    }

    public void setDrawingType_desc(String drawingType_desc) {
        this.drawingType_desc = drawingType_desc;
    }

    public String getDrawingPath() {
        return drawingPath;
    }

    public void setDrawingPath(String drawingPath) {
        this.drawingPath = drawingPath;
    }

    public String getDrawingRemark() {
        return drawingRemark;
    }

    public void setDrawingRemark(String drawingRemark) {
        this.drawingRemark = drawingRemark;
    }

    public String getTechnicsRemark() {
        return technicsRemark;
    }

    public void setTechnicsRemark(String technicsRemark) {
        this.technicsRemark = technicsRemark;
    }

    public String getRelevantDept() {
        return relevantDept;
    }

    public void setRelevantDept(String relevantDept) {
        this.relevantDept = relevantDept;
    }

    public String getDrawingPrice() {
        return drawingPrice;
    }

    public void setDrawingPrice(String drawingPrice) {
        this.drawingPrice = drawingPrice;
    }

    public String getAddFlag() {
        return addFlag;
    }

    public void setAddFlag(String addFlag) {
        this.addFlag = addFlag;
    }

    public List<JyDrawingList> getChildren() {
        return children;
    }

    public void setChildren(List<JyDrawingList> children) {
        this.children = children;
    }

    public List<JyDrawingAnnex> getAnnexes() {
        return annexes;
    }

    public void setAnnexes(List<JyDrawingAnnex> annexes) {
        this.annexes = annexes;
    }
}
